package helper.scxml.scxml2.t0.case3_factoryLines

import helper.base.debug.DebugHelper.DebuggerList.Companion.makeDebuggerList
import helper.base.debug.DebugRes.d_FL_learning
import helper.base.debug.DebugRes.d_ZoneLearningTest_t2t1
import helper.base.debug.DebugRes.d_choiceWeightLHM
import helper.base.debug.DebugRes.d_locationEventVListLHM
import helper.base.debug.DebugRes.d_t1t1Calculate
import helper.base.debug.DebugRes.d_t_2023_0828_143709_
import helper.scxml.scxml2.zone.t2.case3_factoryLines.FLEnvHelper.CalObj.aD5DFun1
import helper.scxml.scxml2.zone.t2.case3_factoryLines.FLLearningHelperKt.FLLearningHelper.Companion.makeFLLearningHelper
import helper.scxml.scxml2.zone.t2.ZoneLearningHelper.GetDFun.Companion.aGetDistanceToCovarianceMatrix
import org.junit.Test

internal class FLLearningTest {
    @Test
    fun t2_debug() {
        val t2ArgUnit = makeFLLearningHelper(
            maxRuns_repeatNum = 20,
            maxGood_repeatNum = 10,
            maxBest_heapSize = 200,
            maxNoBetter = 10,
            maxIterations = 20,
            getDFun = aGetDistanceToCovarianceMatrix,
            clearHeapP = 0.5,
            ifToTxt = true,
            doDoubleMatrixFun = {
                for (i in 0 until this.rows) {
                    this[i, i] += 0.01
                }
                this
            },
            aDsDFun = aD5DFun1,
            timeNeedEnd = 20,
        )
        t2ArgUnit.aT1ByLearningMakeStrategy(
            debuggerList = makeDebuggerList(
                d_t1t1Calculate,
                d_ZoneLearningTest_t2t1,
                d_t_2023_0828_143709_,
                d_FL_learning,
                d_locationEventVListLHM,
                d_choiceWeightLHM,
            ),
        )
    }
}